<?php

namespace App\Http\Controllers\V1\Api;


use App\Models\V1\Information;

use Illuminate\Http\Request;



class InformationController extends BaseController
{

    /**
     * 消息列表
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function List(Request $request)
    {

        $query = Information::query();
        $pageSize = $request->input('pageSize', 10);
        $order = $request->input('order', 'desc');
        $sort = $request->input('sort', 'created_at');
        $query->where('state', 1);
        $query->orderBy($sort, $order);
        $data = $query->paginate($pageSize);
        return ajax_output(200, "成功", $data);
    }

}
